#!/usr/bin/env python
#-*-coding:utf-8-*-
from  urllib import request,parse
import os
from  time import sleep
url='http://www.baidu.com'
headers = {
        'Content-Type': 'application/x-www-form-urlencoded',
        'User-Agent': 'Mozilla/5.0 (Linux; Android 4.3; Nexus 7 Build/JSS15Q) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2307.2 Mobile Safari/537.36'}
rqe = request.Request(url=url, headers=headers)
while(True):
    try:
        p = request.urlopen(rqe).read()
        sleep(10)
    except:
        p=os.popen("/home/ssk/Python/python_stu.git/test/test/2.sh")
        print(p.read())
        sleep(3)
